from pathlib import Path

import torch

# 基础路径配置
PROJECT_ROOT = Path(__file__).parent.parent.parent
DATA_RAW = PROJECT_ROOT / "data" / "raw"
DATA_PROCESSED = PROJECT_ROOT / "data" / "processed"
TRAIN_DIR = DATA_PROCESSED / "train"
TEST_DIR = DATA_PROCESSED / "test"

# CIFAR-10配置
CIFAR10_URL = "https://www.cs.toronto.edu/~kriz/cifar-10-python.tar.gz"
CIFAR10_FILENAME = "cifar-10-python.tar.gz"

# 模型训练
BATCH_SIZE = 128
NUM_WORKERS = 4
DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
LEARNING_RATE = 0.001
EPOCHS = 10

# 模型保存
MODEL_SAVE_DIR = PROJECT_ROOT / "models"
SAVE_INTERVAL = 5
CHECKPOINT_PATH = PROJECT_ROOT / "models/checkpoint.pth"
BEST_MODEL_PATH = PROJECT_ROOT / "models/best_model.pth"

# 日志
LOG_DIR = PROJECT_ROOT / "logs"
